package org.exhaust.barbecue.action;


import org.exhaust.barbecue.AbstractRequest;
import org.exhaust.barbecue.AbstractResponse;
import org.exhaust.barbecue.Action;
import org.exhaust.barbecue.ActionContext;

public abstract class AbstractPostAction<M extends AbstractRequest, N extends AbstractResponse> implements Action {

    @Override
    public boolean perform(AbstractRequest request, AbstractResponse response, ActionContext context) {
        post((M) request, (N) response, context);
        return true;
    }

    protected abstract void post(M request, N response, ActionContext context);
}
